SET QUOTED_IDENTIFIER OFF
GO
SET ANSI_NULLS OFF
GO
CREATE PROCEDURE [dbo].[paCertificaObtenerDestinatarios] 
-- < Registro de Actualizaciones >
-- 25-10-2006 
-- 23-11-2006

	@IDSubProyecto INT

AS
SET NOCOUNT ON
SELECT D.IdDestinatario AS ID, D.Descripcion 
	FROM tb_Destinatarios D
	WHERE D.IdDestinatario NOT IN (SELECT   DSP.IdDestinatario FROM Tb_RelDestinatariosSP DSP  WHERE  DSP.IdSubProyecto=@IdSubProyecto)
	ORDER BY D.Descripcion
GO
GRANT EXECUTE ON  [dbo].[paCertificaObtenerDestinatarios] TO [Certificaciones]
GRANT EXECUTE ON  [dbo].[paCertificaObtenerDestinatarios] TO [CertificacionesAdministracion]
GRANT EXECUTE ON  [dbo].[paCertificaObtenerDestinatarios] TO [SoloVer]
GO
